﻿using System;
using System.Data;
using System.Runtime.Serialization;
using System.Web.Script.Serialization;

namespace YunShop_WebAPI.Model
{
    /// <summary>
    /// 后台页面自定义SQL属性
    /// </summary>
    public class SqlParameterAttribute : Attribute
    {
        public CommandType CommandType { get; set; }
        public string CommandText { get; set; }
        public string Parameter { get; set; }
    }

    /// <summary>
    /// 储存过程枚举
    /// </summary>
    public enum StoredProcedureEnum
    {
        #region 后端-存储过程

        /// <summary>
        /// 查询商家会员信息
        /// </summary>
        [SqlParameter(Parameter = "Name,Fk_business_id,Sex,Types,StartRow,EndRow,Start_date,End_date,Level,Users_tag")]
        P_Select_GetUsersList,

        /// <summary>
        /// 查询商家人脉数据，用户有推荐关系
        /// </summary>
        [SqlParameter(Parameter = "Name,Fk_business_id,StartRow,EndRow")]
        P_Select_GetDistributorContactsList,

        /// <summary>
        /// 查询订单详情
        /// </summary>
        [SqlParameter(Parameter = "Pk_id")]
        P_Select_GetOrderDetailed,

        /// <summary>
        /// 首页数据统计
        /// </summary>
        [SqlParameter(Parameter = "Pk_id")]
        P_Select_GetHomeStatistics,

        /// <summary>
        /// 娱乐资讯列表
        /// </summary>
        [SqlParameter(Parameter = "Fk_business_id,Fk_users_id,Types,Name,StartRow,EndRow,Status,pk_id,Common_Type")]
        P_Select_GetInfotainmentList,

        /// <summary>
        /// 社区团购订单
        /// </summary>
        [SqlParameter(Parameter = "Fk_business_id,Types,Start_date,End_date,Content,StartRow,EndRow")]
        P_Select_GetGroupBuyOrderList,

        /// <summary>
        /// 社区团购收支明细
        /// </summary>
        [SqlParameter(Parameter = "Types,Fk_business_id,Content,Start_date,End_date,StartRow,EndRow")]
        P_Select_GetBudgetDetailed,

        /// <summary>
        /// 查询当前员工得菜单及权限和相应上级菜单
        /// </summary>
        [SqlParameter(Parameter = "Pk_id")]
        P_Select_GetNavigationParentALL,

        /// <summary>
        /// 查询线路产品
        /// </summary>
        [SqlParameter(Parameter = "Content,Is_online,Fk_business_id,Fk_supplier_id,Types,StartRow,EndRow")]
        P_Select_GetTouristProList,

        /// <summary>
        /// 销售统计
        /// </summary>
        [SqlParameter(Parameter = "Fk_business_id,Start_date,End_date,Content,Types,StartRow,EndRow")]
        P_Select_GetProductSales,

        /// <summary>
        /// 查询线路关联酒店
        /// </summary>
        [SqlParameter(Parameter = "Pk_id")]
        P_Select_GetHotelList,

        /// <summary>
        /// 查询门票产品
        /// </summary>
        [SqlParameter(Parameter = "Fk_business_id,Is_online,Types,Content,StartRow,EndRow,Fk_scenic_id")]
        P_Select_GetEntranceTicket,

        /// <summary>
        /// 门票产品预约列表
        /// </summary>
        [SqlParameter(Parameter = "Content,Pk_id,StartRow,EndRow")]
        P_Select_GetOrderAppointList,

        /// <summary>
        /// 分页查询用户信息
        /// </summary>
        [SqlParameter(Parameter = "Fk_business_id,Content,StartRow,EndRow")]
        P_Select_GetUsersWebchatList,

        /// <summary>
        /// 分销商销售统计
        /// </summary>
        [SqlParameter(Parameter = "Fk_business_id,Start_date,End_date")]
        P_Select_GetDistributorOrder,

        /// <summary>
        /// 查询中奖记录
        /// </summary>
        [SqlParameter(Parameter = "Fk_business_id,Types,Content,StartRow,EndRow")]
        P_Select_GetTurntableOrder,

        /// <summary>
        /// 产品推广统计
        /// </summary>
        [SqlParameter(Parameter = "Fk_business_id,Area,Sex,Start_date,End_date")]
        P_Select_GetProductExtension,

        /// <summary>
        /// 查询选中标签用户信息
        /// </summary>
        [SqlParameter(Parameter = "Fk_business_id,Area,Sex,Start_date,End_date,Types,StartRow,EndRow,Content")]
        P_Select_GetLabelUsersList,

        /// <summary>
        /// 查询拼团产品信息
        /// </summary>
        [SqlParameter(Parameter = "Fk_business_id,Pk_id,Content,StartRow,EndRow")]
        P_Select_GetTeambuyPro,

        /// <summary>
        /// 订单发货
        /// </summary>
        [SqlParameter(Parameter = "Detailed_id,Order_no,Express,Express_no,Express_date")]
        P_Update_OrderStatus,

        /// <summary>
        /// 根据标签查询用户信息
        /// </summary>
        [SqlParameter(Parameter = "Fk_business_id,Area,Sex,Start_date,End_date,Content")]
        P_Select_GetLabelUsersListTag,

        /// <summary>
        /// 查询工单提交信息
        /// </summary>
        [SqlParameter(Parameter = "Content,Fk_business_id,Mode,Types,Status,Mobile,StartRow,EndRow")]
        P_Select_GetWorkOrder,

        /// <summary>
        /// 查询退款订单
        /// </summary>
        [SqlParameter(Parameter = "Fk_business_id,Status,Start_date,End_date,Content,StartRow,EndRow")]
        P_Select_GetOrderRefund,

        /// <summary>
        /// 获得单个订单
        /// </summary>
        [SqlParameter(
            Parameter = "Pk_id",
            CommandType = CommandType.Text,
            CommandText = "SELECT fk_business,address,mobile,name,date_creation FROM b_order WHERE pk_id = @Pk_id")]
        P_Select_GetOrderItem,

        /// <summary>
        /// 查询订单明细
        /// </summary>
        [SqlParameter(Parameter = "Types,Pk_id,Fk_business_id")]
        P_Select_GetOrderDetail,

        /// <summary>
        /// 添加视频号开通流程信息
        /// </summary>
        [SqlParameter(
            Parameter = "Pk_id",
            CommandType = CommandType.Text,
            CommandText = "INSERT INTO b_videonum_application(fk_business_id,shop_register_apply,date_creation) VALUES(@Pk_id,1,GETDATE())"
            )]
        P_Insert_VideoNum_BaseInfo,

        /// <summary>
        /// 更新视频号申请类目信息
        /// </summary>
        [SqlParameter(
            Parameter ="Pk_id,Code",
            CommandType = CommandType.Text,
            CommandText = "UPDATE b_videonum_application SET shop_category_list = @Code WHERE fk_business_id = @Pk_id"
            )]
        P_Update_VideoNum_ShopCatInfo,

        /// <summary>
        /// 更新视频号类目审核信息
        /// </summary>
        [SqlParameter(
            Parameter ="Pk_id,Code",
            CommandType = CommandType.Text,
            CommandText = "UPDATE b_videonum_application SET shop_audit_category = @Code WHERE fk_business_id = @Pk_id"
            )]
        P_Update_VideoNum_AuditCat,

        /// <summary>
        /// 获取商家资质图片列表
        /// </summary>
        [SqlParameter(
            Parameter ="Pk_id",
            CommandType = CommandType.Text,
            CommandText = "SELECT details,media_type FROM b_videonum_data WHERE fk_business_id = @Pk_id AND type = 1"
            )]
        P_Select_VideoNum_Qualification_Pic,

        /// <summary>
        /// 修改订单状态
        /// </summary>
        [SqlParameter(Parameter = "Pk_id,Status")]
        P_Update_SetOrderRefundStatus,

        /// <summary>
        ///退积分
        /// </summary>
        [SqlParameter(Parameter = "Pk_id")]
        P_Update_SetOrderRefundIntegral,

        /// <summary>
        /// 查询商家销售汇总统计
        /// </summary>
        [SqlParameter(Parameter = "Agent_id,Name,StartRow,EndRow,Start_date,End_date")]
        P_Select_GetBusinessSalesStatistics,

        /// <summary>
        /// 查询可共享的商家列表
        /// </summary>
        [SqlParameter(Parameter = "Fk_business_id,Name,StartRow,EndRow,Mode")]
        P_Select_GetChannelBusinessList,

        /// <summary>
        /// 实物商城
        /// </summary>
        [SqlParameter(Parameter = "Fk_business_id,Content,StartRow,EndRow")]
        P_Select_GetCoverShareProduct,

        /// <summary>
        /// 代理商商品销量统计
        /// </summary>
        [SqlParameter(Parameter = "Code,Start_date,End_date,Content,Types,StartRow,EndRow")]
        P_Select_GetAgentProductSales,

        /// <summary>
        /// 查询代理商申请开户列表
        /// </summary>
        [SqlParameter(Parameter = "StartRow,EndRow,Fk_business_id,Name,Status")]
        P_Select_GetAgentApplyList,

        /// <summary>
        /// 查询供应商信息（评分，已售金额，已提现金额）
        /// </summary>
        [SqlParameter(Parameter = "Pk_id,Types")]
        P_Select_GetProductSupplierInfo,

        /// <summary>
        /// 查询商家引用的普通商品列表
        /// </summary>
        [SqlParameter(Parameter = "Fk_business_id,Name,StartRow,EndRow,Status")]
        P_Select_GetBusinessShareProList,

        /// <summary>
        /// 查询商家可提供共享的产品列表
        /// </summary>
        [SqlParameter(Parameter = "Fk_business_id,Name,StartRow,EndRow,Pk_id")]
        P_Select_GetCanShareProductList,

        /// <summary>
        /// 我申请共享商家列表
        /// </summary>
        [SqlParameter(Parameter = "Fk_business_id,StartRow,EndRow")]
        P_Select_GetMyApplyShareBusinessList,

        /// <summary>
        /// 实时分析
        /// </summary>
        [SqlParameter(Parameter = "Fk_business_id")]
        P_Select_GetRealAnalysis,

        /// <summary>
        /// 用户统计
        /// </summary>
        [SqlParameter(Parameter = "Fk_business_id")]
        P_Select_GetBusinessUsersCount,


        /// <summary>
        /// 查询商家产品的全部库存
        /// </summary>
        [SqlParameter(Parameter = "Fk_business_id,Name,StartRow,EndRow,Pk_id,Code")]
        P_Select_GetProductStockAllList,

        /// <summary>
        /// 查询餐厅桌位管理
        /// </summary>
        [SqlParameter(Parameter = "StartRow,EndRow,Fk_business_id,Name,Status,Fk_meal_id,Pk_id")]
        P_Select_GetMealSeat,

        /// <summary>
        /// 查询餐厅菜品
        /// </summary>
        [SqlParameter(Parameter = "StartRow,EndRow,Fk_business_id,Name,Fk_meal_id,Status,Types")]
        P_Select_GetMealPro,

        /// <summary>
        /// 查询入出库记录
        /// </summary>
        [SqlParameter(Parameter = "Fk_business_id,Types,Name,Start_date,End_date,StartRow,EndRow")]
        P_Select_GetProductStock,

        /// <summary>
        /// 查询小游戏产品列表 Types=游戏主题的ID
        /// </summary>
        [SqlParameter(Parameter = "Fk_business_id,Types,Name,StartRow,EndRow,Status")]
        P_Select_GetGameProductList,

        /// <summary>
        /// 查询产品列表
        /// </summary>
        [SqlParameter(Parameter = "Fk_business_id,Fk_supplier_id,Name,Status,Mode,One_level,Types,Two_level,StartRow,EndRow,Sort,Share_status")]
        P_Select_GetProductList,

        /// <summary>
        /// 查询产品套餐列表
        /// </summary>
        [SqlParameter(Parameter = "Fk_business_id,Fk_supplier_id,Name,Status,One_level,Two_level,StartRow,EndRow")]
        P_Select_GetProductPackageList,

        /// <summary>
        /// 查询置换产品列表
        /// </summary>
        [SqlParameter(Parameter = "Fk_business_id,Fk_supplier_id,StartRow,EndRow,Name,Status,One_level")]
        P_Select_GetSubstitutionProductList,

        /// <summary>
        /// 查询拍卖产品列表
        /// </summary>
        [SqlParameter(Parameter = "Fk_business_id,Fk_supplier_id,Name,Status,Mode,One_level,Types,Two_level,StartRow,EndRow,Sort")]
        P_Select_GetAuctionProductList,

        /// <summary>
        /// 根据不同的类型查询库存列表
        /// </summary>
        [SqlParameter(Parameter = "Pk_id,Types,Name,StartRow,EndRow,FK_pro_id")]
        P_Select_GetProductStockToType,

        /// <summary>
        /// 查询分销商下级会员人数
        /// </summary>
        [SqlParameter(Parameter = "Fk_business_id,Fk_users_id")]
        P_Select_GetRecursiveLevel,


        /// <summary>
        /// 查询盘点基础记录数据
        /// </summary>
        [SqlParameter(Parameter = "Fk_business_id,StartRow,EndRow,Name")]
        P_Select_GetNventoryList,

        /// <summary>
        /// 盘点明细列表
        /// </summary>
        [SqlParameter(Parameter = "Pk_id,StartRow,EndRow,Name")]
        P_Select_GetNventoryInfoList,

        /// <summary>
        /// 根据类型查询字典表数据
        /// 类型1、酒店设施 2、酒店服务 3、房间设施 4、旅游产品标签5、题库类型 6、休闲项目 7、用户标签 8、 用户来源  9、后台图标
        /// </summary>
        [SqlParameter(Parameter = "Fk_business_id,StartRow,EndRow,Types,Name,Status")]
        P_Select_GetCommonDictionaryList,

        /// <summary>
        /// 查询积分商城产品列表信息
        /// </summary>
        [SqlParameter(Parameter = "Fk_business_id,Types,StartRow,EndRow,Name,Status")]
        P_Select_GetMallProductList,

        /// <summary>
        /// 查询用户提交表单内容
        /// </summary>
        [SqlParameter(Parameter = "Name,Fk_business_id,Start_date,End_date,StartRow,EndRow,Pk_id")]
        P_Select_GetCustomFormList,

        /// <summary>
        /// 查询餐饮座位列表
        /// </summary>
        [SqlParameter(Parameter = "Fk_business_id,Content,StartRow,EndRow")]
        P_Select_GetMealSeatList,

        /// <summary>
        /// 查询VIP订单列表
        /// </summary>
        [SqlParameter(Parameter = "Fk_business_id,Types,Status,Pay_type,Start_date,End_date,Name,StartRow,EndRow")]
        P_Select_GetOrderVIPList,

        /// <summary>
        /// 查询视频订单列表
        /// </summary>
        [SqlParameter(Parameter = "Fk_business_id,Types,Status,Pay_type,Start_date,End_date,Name,StartRow,EndRow")]
        P_Select_GetOrderVideoList,

        /// <summary>
        /// 查询提现审核列表
        /// </summary>
        [SqlParameter(Parameter = "Fk_business_id,Start_date,End_date,Content,StartRow,EndRow,Status,Types")]
        P_Select_GetCommissionExamineList,

        /// <summary>
        /// 查询普通产品订单明细列表 -1 查询全部
        /// </summary>
        [SqlParameter(Parameter = "Name,Fk_business_id,Pay_status,StartRow,EndRow,Fk_supplier_id,Start_date,End_date")]
        P_Select_GetProductOrderList,

        /// <summary>
        /// 查询供应商订单列表
        /// </summary>
        [SqlParameter(Parameter = "Name,Fk_business_id,Pay_status,StartRow,EndRow,Fk_supplier_id,Start_date,End_date")]
        P_Select_GetProductOrderListAll,

        /// <summary>
        /// 根据自提地址查询订单列表
        /// </summary>
        [SqlParameter(Parameter = "Name,Address,Fk_business_id,Pay_status,StartRow,EndRow,Start_date,End_date")]
        P_Select_GetProductOrderByAddressList,


        /// <summary>
        /// 积分商城订单列表 -1 查询全部
        /// </summary>
        [SqlParameter(Parameter = "Name,Fk_business_id,Pay_status,StartRow,EndRow,Start_date,End_date")]
        P_Select_GetMallProductOrderList,

        /// <summary>
        /// 查询娱乐资讯订单列表 -1 查询全部
        /// </summary>
        [SqlParameter(Parameter = "Name,Fk_business_id,Pay_status,StartRow,EndRow,Fk_users_id,Start_date,End_date")]
        P_Select_GetInfotainmentPayOrderList,

        /// <summary>
        /// 查询优惠券套餐订单列表 -1 查询全部
        /// </summary>
        [SqlParameter(Parameter = "Name,Fk_business_id,Pay_status,StartRow,EndRow,Fk_users_id,Start_date,End_date")]
        P_Select_GetOrderCouponList,


        /// <summary>
        /// 根据类型查询供应商的结算订单
        /// </summary>
        [SqlParameter(Parameter = "Name,Fk_business_id,Pay_status,StartRow,EndRow,Types,Start_date,End_date,Pk_id")]
        P_Select_GetSupplierSettlementOrderList,


        /// <summary>
        /// 查询拍卖产品订单明细列表 -1 查询全部
        /// </summary>
        [SqlParameter(Parameter = "Name,Fk_business_id,Pay_status,StartRow,EndRow,Fk_supplier_id,Start_date,End_date")]
        P_Select_GetAuctionProductOrderList,


        /// <summary>
        /// 查询押金的缴费记录
        /// </summary>
        [SqlParameter(Parameter = "Name,Fk_business_id,Pay_status,StartRow,EndRow,Start_date,End_date")]
        P_Select_GetAuctionDepositList,

        /// <summary>
        /// 根据地区查询关联级联
        /// </summary>
        [SqlParameter(Parameter = "Name")]
        P_Select_GetCommonRegionByName,

        /// <summary>
        /// 查询佣金提现审核
        /// </summary>
        [SqlParameter(Parameter = "Pk_id")]
        P_Select_SetCommissionExamine,

        /// <summary>
        /// 查询共享池产品列表信息
        /// </summary>
        [SqlParameter(Parameter = "Sort,Fk_business_id,Name,StartRow,EndRow,Pk_id,Types")]
        P_Select_GetProductPoolList,

        /// <summary>
        /// 根据产品ID查询共享产品库存信息
        /// </summary>
        [SqlParameter(Parameter = "Pk_id")]
        P_Select_GetProductStockPoolList,

        /// <summary>
        /// 查询退款订单信息
        /// </summary>
        [SqlParameter(Parameter = "Pk_id")]
        P_Select_SetOrderRefundAudit,

        /// <summary>
        /// 订单退款-退佣金&收支记录&退积分
        /// </summary>
        [SqlParameter(Parameter = "Pk_id,Fk_business_id,Fk_users_id,Code,Order_no,Price,DateTime,Types")]
        P_Update_SetOrderRefundAudit,

        /// <summary>
        /// 查询酒店房型库存信息
        /// </summary>
        [SqlParameter(Parameter = "Pk_id,Content,Start_date,End_date,StartRow,EndRow")]
        P_Select_GetHotelRoomStockList,

        /// <summary>
        /// 查询供应商提现申请
        /// </summary>
        [SqlParameter(Parameter = "Pk_id,Fk_business_id,Fk_supplier_id,Status,Start_date,End_date,StartRow,EndRow,Types")]
        P_Select_GetSupplierWithdrawList,

        /// <summary>
        /// 根据微信会员ID 获取付款配置信息
        /// </summary>
        [SqlParameter(Parameter = "Pk_id")]
        P_Select_SetSupplierWithdraw,

        /// <summary>
        /// 查询供应商提现在线提现用户ID
        /// </summary>
        [SqlParameter(Parameter = "Pk_id")]
        P_Select_GetSupplierBindUsersid,

        /// <summary>
        /// 订单核销
        /// </summary>
        [SqlParameter(Parameter = "Pk_id,Detailed_id,Num")]
        P_Update_SetWriteOFFOrder,

        /// <summary>
        /// 数据统计
        /// </summary>
        [SqlParameter(Parameter = "")]
        P_Select_GetSystemDataStatistics,

        /// <summary>
        /// 数据统计-旧版
        /// </summary>
        [SqlParameter(Parameter = "")]
        P_Select_GetSystemDataStatisticsUsed,

        /// <summary>
        /// 查询分红商品列表
        /// </summary>
        [SqlParameter(Parameter = "Fk_business_id,Fk_supplier_id,Types,Name,StartRow,EndRow,Status")]
        P_Select_GetBonusProList,

        /// <summary>
        /// 查询分红商品详情
        /// </summary>
        [SqlParameter(Parameter = "Pk_id")]
        P_Select_Web_GetBonusProDetailed,

        /// <summary>
        /// 查询产品的列表，收银机端使用
        /// </summary>
        [SqlParameter(Parameter = "Fk_business_id,StartRow,EndRow,Types,Parents,Name")]
        P_Select_GetCashRegisterProductList,

        /// <summary>
        /// 查询优惠劵领取信息
        /// </summary>
        [SqlParameter(Parameter = "Code")]
        P_Select_GetCouponReceiveList,

        /// <summary>
        /// 查询用户等级及自动更新等级
        /// </summary>
        [SqlParameter(Parameter = "Fk_business_id,Fk_users_id,Price,Types")]
        P_Select_UsersUpgradeLevel,

        /// <summary>
        /// 查询订单详情信息
        /// </summary>
        [SqlParameter(Parameter = "Pk_id")]
        P_Select_GetOrderDetailedProduct,

        /// <summary>
        /// 查询会员等级
        /// </summary>
        [SqlParameter(Parameter = "Fk_business_id,Types")]
        P_Select_GetUsersGradeList,

        /// <summary>
        /// 查询会员佣金明细
        /// </summary>
        [SqlParameter(Parameter = "Fk_business_id,Fk_users_id,Types,Is_cash,Status,StartRow,EndRow,Start_date,End_date")]
        P_Select_GetCommissionList,

        /// <summary>
        /// 领取优惠劵
        /// </summary>
        [SqlParameter(Parameter = "Fk_coupon_id,Fk_users_id,Status")]
        P_Update_SetCouponReceive,

        /// <summary>
        /// 产品导出
        /// </summary>
        [SqlParameter(Parameter = "Fk_business_id,One_type,Two_type,Content")]
        P_Select_ExportProduct,

        /// <summary>
        /// 验证账户是否重复
        /// </summary>
        [SqlParameter(Parameter = "Pk_id,Account")]
        P_Select_GetAerificationAccount,

        /// <summary>
        /// 查询结算订单
        /// </summary>
        [SqlParameter(Parameter = "Content,Pk_id,Start_date,End_date,StartRow,EndRow,Mode,Pay_status")]
        P_Select_GetSettlementOrderList,

        /// <summary>
        /// 查询资金明细
        /// </summary>
        [SqlParameter(Parameter = "Pk_id,StartRow,EndRow")]
        P_Select_GetPurchaserConsumeList,

        /// <summary>
        /// 查询门票景区订单列表
        /// </summary>
        [SqlParameter(Parameter = "Pk_id,Fk_business_id,Name,StartRow,EndRow,Start_date,End_date,Status")]
        P_Select_GetOrderTicketScenicList,

        /// <summary>
        /// 查询短信发送记录
        /// </summary>
        [SqlParameter(Parameter = "Fk_business_id,Name,StartRow,EndRow,Status")]
        P_Select_GetSmsRecordList,

        /// <summary>
        /// 商家分账申请列表
        /// </summary>
        [SqlParameter(Parameter = "Content,StartRow,EndRow")]
        P_Select_GetBusinessHuanxunList,

        /// <summary>
        /// 查询会员绑定信息（企业会员）
        /// </summary>
        [SqlParameter(Parameter = "Name,Fk_business_id,StartRow,EndRow")]
        P_Select_GetMeetingUsersList,

        /// <summary>
        /// 批量查询共享产品的图文信息
        /// </summary>
        [SqlParameter(Parameter = "Fk_business_id,Pk_id,Start_date")]
        P_Select_GetShareProductImg,

        /// <summary>
        /// 新增和编辑共享产品图文信息
        /// </summary>
        [SqlParameter(Parameter = "Pk_id,Remark,Descript")]
        P_Insert_AddShareProductImg,

        /// <summary>
        /// 查询分账账单
        /// </summary>
        [SqlParameter(Parameter = "Fk_business_id,Account,Code,StartRow,EndRow,Start_date,End_date")]
        P_Select_GetOrderSeparateList,

        /// <summary>
        /// 查询分账数据
        /// </summary>
        [SqlParameter(Parameter = "Pk_id,Code")]
        P_Select_SetOrderSettlement,

        /// <summary>
        /// 查询全部商家信息
        /// </summary>
        [SqlParameter(Parameter = "Name,StartRow,EndRow,Sort,Types,Status,Mode")]
        P_Select_GetBusinessAllList,

        /// <summary>
        /// 模板消息推送
        /// </summary>
        [SqlParameter(Parameter = "Pk_id,Types,Fk_business_id,Fk_users_id")]
        P_Select_MessagePush,

        /// <summary>
        /// 查询订阅参数配置
        /// </summary>
        [SqlParameter(Parameter = "Content,Types,StartRow,EndRow")]
        P_Select_GetSubscribeLibraryList,

        /// <summary>
        /// 查询订单详情信息
        /// </summary>
        [SqlParameter(Parameter = "Types,Pk_id")]
        P_Select_GetOrderDetailedRefund,

        /// <summary>
        /// 新增和编辑答题试卷
        /// </summary>
        [SqlParameter(Parameter = "Fk_business_id,Types,Name,Num,Val,Status,Pk_id")]
        P_Insert_AddGameQuestionPaper,

        /// <summary>
        /// 查询证书列表
        /// </summary>
        [SqlParameter(Parameter = "Name,Fk_business_id,StartRow,EndRow")]
        P_Select_GetGameQuestionPaper,

        /// <summary>
        /// 查询商家开户信息
        /// </summary>
        [SqlParameter(Parameter = "Name")]
        P_Select_GetPayBusinessList,

        /// <summary>
        ///查询代理商订单信息
        /// </summary>
        [SqlParameter(Parameter = "Code,Start_date,End_date,Content,Types,StartRow,EndRow,Pay_status,Pay_type")]
        P_Select_GetOrderGgentAllList,

        /// <summary>
        /// 查询代理商下分销商订单累计
        /// </summary>
        [SqlParameter(Parameter = "Name,Code,Start_date,End_date,StartRow,EndRow")]
        P_Select_GetGgentDataStatistics,

        /// <summary>
        /// 查询代理商订单总数  金额大于350
        /// </summary>
        [SqlParameter(Parameter = "Code,Start_date,End_date")]
        P_Select_GetOrderGgentAllCount,

        /// <summary>
        /// 查询行政区域编码
        /// </summary>
        [SqlParameter(
         CommandType = CommandType.Text,
         CommandText = "SELECT * FROM  m_common_region WHERE parent_code=@Code",
         Parameter = "Code")]
        P_Select_GetCommonRegionList,

        /// <summary>
        /// 查询行业编码
        /// </summary>
        [SqlParameter(
         CommandType = CommandType.Text,
         CommandText = "SELECT * FROM m_common_industry_code",
         Parameter = "")]
        P_Select_GetCommonIndustryCodeList,

        /// <summary>
        /// 查询分账商家信息
        /// </summary>
        [SqlParameter(Parameter = "Fk_business_id")]
        P_Select_GetSeparateBusiness,

        /// <summary>
        /// 根据类型查询不同的订单列表
        /// </summary>
        [SqlParameter(Parameter = "Name,Fk_business_id,Pay_status,StartRow,EndRow,Types,Status,Start_date,End_date")]
        P_Select_GetOrderAllList,

        /// <summary>
        /// 查询区域代理的全部订单信息
        /// </summary>
        [SqlParameter(Parameter = "Name,Fk_business_id,Pay_status,StartRow,EndRow,Area,Start_date,End_date,Pk_id")]
        P_Select_GetAgentOrderAllList,

        /// <summary>
        /// 根据供应商代理ID查询订单列表
        /// </summary>
        [SqlParameter(Parameter = "Name,Fk_business_id,Pay_status,StartRow,EndRow,Start_date,End_date,Pk_id")]
        P_Select_GetProAgentOrderAllList,

        /// <summary>
        /// 查询餐饮订单明细
        /// </summary>
        [SqlParameter(Parameter = "Name,Fk_business_id,Pay_status,StartRow,EndRow,Types,Status,Start_date,End_date,Mode")]
        P_Select_GetMealOrderList,

        /// <summary>
        /// 根据酒店ID查询酒店订单明细
        /// </summary>
        [SqlParameter(Parameter = "Name,Fk_business_id,Pay_status,StartRow,EndRow,Types,Start_date,End_date")]
        P_Select_GetHotelOrderAllList,

        /// <summary>
        /// 根据旅行社查询订单明细列表
        /// </summary>
        [SqlParameter(Parameter = "Name,Fk_business_id,Pay_status,StartRow,EndRow,Types,Start_date,End_date")]
        P_Select_GetTravelagencyOrderAllList,

        /// <summary>
        /// 查询商家短信充值列表
        /// </summary>
        [SqlParameter(Parameter = "Fk_business_id,Name,Status,Types,StartRow,EndRow")]
        P_Select_GetSmsRechargeList,

        /// <summary>
        /// 查询商家配送员信息
        /// </summary>
        [SqlParameter(Parameter = "Fk_business_id,Name,Status,Types,StartRow,EndRow")]
        P_Select_GetMealDeliveryList,

        /// <summary>
        /// 查询分销商特殊身份数据
        /// </summary>
        [SqlParameter(Parameter = "Fk_business_id,Name,StartRow,EndRow")]
        P_Select_GetSubordinateUsersList,

        /// <summary>
        /// 查询会员下级的所有人数
        /// </summary>
        [SqlParameter(Parameter = "Name,Fk_business_id,Fk_users_id,StartRow,EndRow")]
        P_Select_GetUsersQuerySubordinate,

        /// <summary>
        /// 查询团队会员数据统计
        /// </summary>
        [SqlParameter(Parameter = "FK_users_id,Fk_business_id")]
        P_Select_GetSubordinateUsersInfo,

        /// <summary>
        /// 查询快递公司编码
        /// </summary>
        [SqlParameter(
         CommandType = CommandType.Text,
         CommandText = "SELECT com FROM  m_common_express  WHERE name=@Name",
         Parameter = "Name")]
        P_Select_GetExpressComInfo,

        /// <summary>
        /// 递归查询用户的所有下级
        /// </summary>
        [SqlParameter(
        CommandType = CommandType.Text,
        CommandText = "SELECT * FROM FUN_UsersRecursiveLevel(@Fk_business_id, @Fk_users_id)",
        Parameter = "Fk_business_id,Fk_users_id")]
        P_Select_GetUsersRecursiveLevel,
 
        /// <summary>
        /// 流量分析
        /// </summary>
        [SqlParameter(Parameter = "Fk_business_id")]
        P_Select_GetFlowStatistics,

        /// <summary>
        /// 查询会员数据
        /// </summary>
        [SqlParameter(Parameter = "Pk_id")]
        P_Select_GetUsersOrderList,

        /// <summary>
        /// 根据类型查询不同供应商的数据统计  类型  4-产品供应商，6-景区账户，7-餐厅账户
        /// </summary>
        [SqlParameter(Parameter = "Pk_id,Types")]
        P_Select_GetSupplierStatistics,

        /// <summary>
        /// 查询防伪条码列表信息
        /// </summary>
        [SqlParameter(Parameter = "Fk_business_id,Name,StartRow,EndRow")]
        P_Select_GetProductBarCodeList,

        /// <summary>
        /// 查询电子卡券列表
        /// </summary>
        [SqlParameter(Parameter = "Fk_business_id,Name,StartRow,EndRow")]
        P_Select_GetElectronInfoList,

        /// <summary>
        /// 商家编辑产品时，同步共享商家的供应商信息
        /// </summary>
        [SqlParameter(
         CommandType = CommandType.Text,
         CommandText = "UPDATE b_product SET fk_supplier_id=@Pk_id WHERE business_pro_id=@Fk_Product_id",
         Parameter = "Pk_id,Fk_Product_id")]
        P_Update_UpdateProductSyncVendor,

        /// <summary>
        /// 商家修改产品价格时，批量修改共享产品下架,更新所有的产品的供应商信息
        /// </summary>
        [SqlParameter(
         CommandType = CommandType.Text,
         CommandText = "update b_product  set is_online=0 where business_pro_id=@Pk_id ",
         Parameter = "Pk_id")]
        P_Update_UpdateProductStatusByProId,

        /// <summary>
        /// 查询商家的默认APPID
        /// </summary>
        [SqlParameter(
         CommandType = CommandType.Text,
         CommandText = "SELECT TOP 1 appid FROM b_business_account WHERE fk_business_id = @Pk_id",
         Parameter = "Pk_id")]
        P_Select_GetBusinessAppid,

        /// <summary>
        /// 查询商家的默认APPID和APPSECRET
        /// </summary>
        [SqlParameter(
          CommandType = CommandType.Text,
          CommandText = "SELECT TOP 1 appid,secret FROM b_business_account WHERE fk_business_id = @Pk_Id",
          Parameter = "Pk_Id")]
        P_Select_GetBusinessAppIdSecret,
        /// <summary>
        /// 查询商家VIP会员等级设置
        /// </summary>
        [SqlParameter(Parameter = "Fk_business_id,StartRow,EndRow")]
        P_Select_GetMembershipFeesList,

        /// <summary>
        /// 查询商家套餐设置
        /// </summary>
        [SqlParameter(Parameter = "Fk_business_id,Code,StartRow,EndRow")]
        P_Select_GetPackageSettingsList,

        /// <summary>
        /// 根据ID查询用户下级订单
        /// </summary>
        [SqlParameter(Parameter = "Name,Fk_users_id,Fk_business_id,Pay_status,StartRow,EndRow,Types,Start_date,End_date")]
        P_Select_GetUserSubordinateOrderList,

        /// <summary>
        /// 根据条码查询信息
        [SqlParameter(Parameter = "Code,Guid")]
        P_Select_GetElectronInfoByCode,

        /// <summary>
        /// 查询押金支付信息
        /// </summary>
        [SqlParameter(
         CommandType = CommandType.Text,
         CommandText = "select * from b_product_auction_deposit where order_no=@Order_no and pay_status!=0",
         Parameter = "Order_no")]
        P_Select_GetAuctionDepositInfo,

        /// <summary>
        /// 查询律动仪订单信息
        /// </summary>
        [SqlParameter(
         CommandType = CommandType.Text,
         CommandText = "select * from b_rhythm_pay where order_no=@Order_no and pay_status!=0",
         Parameter = "Order_no")]
        P_Select_GetRhythmPayInfo,
 
        /// <summary>
        /// 查询一条7天以前的冻结的订单
        /// </summary>
        [SqlParameter(
         CommandType = CommandType.Text,
         CommandText = "SELECT top 100 b_pay_ledger_record.pk_id FROM b_pay_ledger_record LEFT JOIN b_order on b_order.pk_id=b_pay_ledger_record.fk_order_id WHERE b_pay_ledger_record.date_creation<@Start_date AND frozen_flag=2 and pay_status not in(0,3) and pay_type=4",
         Parameter = "Start_date")]
        P_Select_GetPayLedgerRecord,

        /// <summary>
        /// 查询VIP产品奖金池数据
        /// </summary>
        [SqlParameter(Parameter = "Fk_business_id,StartRow,EndRow,Start_date,End_date")]
        P_Select_GetVipBonusPoolList,

        /// <summary>
        /// 查询分红产品奖金池数据
        /// </summary>
        [SqlParameter(Parameter = "Fk_business_id,StartRow,EndRow,Start_date,End_date")]
        P_Select_GetBonusPrizePoolList,

        /// <summary>
        /// 删除结算明细信息
        /// </summary>
        [SqlParameter(
         CommandType = CommandType.Text,
         CommandText = "DELETE b_product_supplier_withdraw_detailed WHERE fk_withdraw_id=@Pk_id",
         Parameter = "Pk_id")]
        P_Delete_DelWithdrawDetailed,

        /// <summary>
        /// 查询普通订单超过10天的数据
        /// </summary>
        [SqlParameter(
         CommandType = CommandType.Text,
         CommandText = "SELECT top 100 pk_id FROM  b_order WHERE type=1 and date_creation<@Start_date and pay_status=4 order by date_creation desc",
         Parameter = "Start_date")]
        P_Select_GetTimeOutOrder,

        /// <summary>
        /// 删除拍卖库存超出半小时的数据
        /// </summary>
        [SqlParameter(
         CommandType = CommandType.Text,
         CommandText = "SELECT COUNT(0) AS 'count' FROM b_product_auction_num where stock_num=1 and end_date < @End_date  delete b_product_auction_num where stock_num=1 and end_date < @End_date   Update b_product_auction_num set stock_num=0 where stock_num<0",
         Parameter = "End_date")]
        P_Delete_DelProductAuctionNum,
 
        /// <summary>
        ///修改订单自动核销信息
        /// </summary>
        [SqlParameter(
        CommandType = CommandType.Text,
        CommandText = "UPDATE b_order SET pay_status = 10 WHERE pk_id =@Pk_id    UPDATE b_order_product SET validate_num = num WHERE fk_order_id =@Pk_id",
        Parameter = "Pk_id")]
        P_Update_UpdateAutomaticWriteOff,

        /// <summary>
        /// 查询普通订单超过30天的未支付的数据
        /// </summary>
        [SqlParameter(
         CommandType = CommandType.Text,
         CommandText = "SELECT top 10 pk_id FROM  b_order WHERE type=1 and date_creation<@Start_date and pay_status=0",
         Parameter = "Start_date")]
        P_Select_GetTimeOutUnpaidOrder,

        /// <summary>
        ///删除超过30天的订单数据
        /// </summary>
        [SqlParameter(
        CommandType = CommandType.Text,
        CommandText = "DELETE b_order WHERE pk_id =@Pk_id  DELETE b_order_product WHERE fk_order_id =@Pk_id",
        Parameter = "Pk_id")]
        P_Delete_DelTimeOutUnpaidOrder,

        /// <summary>
        /// 根据ID查询商家名称
        /// </summary>
        [SqlParameter(
         CommandType = CommandType.Text,
         CommandText = "SELECT name FROM  b_business where pk_id=@Pk_id",
         Parameter = "Pk_id")]
        P_Select_GetBusinessName,

        /// <summary>
        /// 根据类型查询评论列表
        /// </summary>
        [SqlParameter(Parameter = "Fk_business_id,Name,StartRow,EndRow,Types")]
        P_Select_GetCommonCommentList,

        /// <summary>
        /// 查询用户的收货地址
        /// </summary>
        [SqlParameter(
         CommandType = CommandType.Text,
         CommandText = "SELECT pk_id,name,mobile,area,address,sort FROM  u_users_order_address WHERE fk_users_id=@Pk_id  ORDER BY  sort desc",
         Parameter = "Pk_id")]
        P_Select_GetUsersOrderAddress,

        /// <summary>
        /// 更新退款备注
        /// </summary>
        [SqlParameter(
         CommandType = CommandType.Text,
         CommandText = " UPDATE  b_order_refund  SET refund_remark+=@Name WHERE pk_id = @Pk_id",
         Parameter = "Name,Pk_id")]
        P_Update_UpdateOrderRefund,

        /// <summary>
        /// 根据条件筛选电话号码
        /// </summary>
        [SqlParameter(Parameter = "Fk_business_id,Start_date,End_date,Mode,Types")]
        P_Select_GetUsersMobileList,

        /// <summary>
        /// 修改用户信息，注销原用户信息
        /// </summary>
        [SqlParameter(
         CommandType = CommandType.Text,
         CommandText = "update  u_users_webchat  set openid+='ZX',small_routine+='ZX',otherid+='ZX' WHERE pk_id=@Pk_id   update u_users set mobile='',unionid='',status=0 where pk_id=(select fk_users_id from u_users_webchat where pk_id=@Pk_id)",
         Parameter = "Pk_id")]
        P_Update_UserLogout,

        /// <summary>
        /// 查询拍卖场次的库存
        /// </summary>
        [SqlParameter(
          CommandType = CommandType.Text,
          CommandText = "SELECT stock_num FROM  b_product_auction_num WHERE pk_id = @Pk_id",
          Parameter = "Pk_id")]
        P_Select_GetProductAuctionStock,

        //更新门票外部产品ID,同步产品信息到支付宝
        [SqlParameter(
        CommandType = CommandType.Text,
        CommandText = " update b_ticket_pro set external_id=@Name where pk_id=@Pk_id",
        Parameter = "Name,Pk_id")]
        P_Update_UpdateTicketProExternalId,

        //更新门票订单ID,同步支付宝订单号到本地
        [SqlParameter(
        CommandType = CommandType.Text,
        CommandText = "update b_order_ticket set code_number=@Name where fk_order_id=@Pk_id",
        Parameter = "Name,Pk_id")]
        P_Update_UpdateTicketOrderExternalId,

        /// <summary>
        /// 查询门票订单明细信息
        /// </summary>
        [SqlParameter(Parameter = "Pk_id")]
        P_Select_GetTicketOrderDetailedInfo,

        /// <summary>
        /// 根据类型查询不同的订单列表
        /// </summary>
        [SqlParameter(Parameter = "Name,Fk_business_id,Fk_users_id,StartRow,EndRow,Types,Start_date,End_date")]
        P_Select_GetUsersIntegralList,

        /// <summary>
        /// 查询电子条码批次列表
        /// </summary>
        [SqlParameter(Parameter = "Pk_id,StartRow,EndRow")]
        P_Select_GetElectronCode,

        /// <summary>
        /// 查询商家区域代理列表
        /// </summary>
        [SqlParameter(Parameter = "Name,Fk_business_id,StartRow,EndRow")]
        P_Select_GetBusinessRegionalAgentList,

        /// <summary>
        /// 批量更新返佣金额
        /// </summary>
        [SqlParameter(Parameter = "Fk_business_id,Types,Fk_pro_id,Fk_stock_id,Price,Amount,Mode")]
        P_Update_SetBatchSetCommission,

        /// <summary>
        /// 查询会议列表信息
        /// </summary>
        [SqlParameter(Parameter = "Fk_business_id,Name,StartRow,EndRow,Status")]
        P_Select_GetMeetingInfoList,

        /// <summary>
        /// 查询会议嘉宾或展商介绍
        /// </summary>
        [SqlParameter(Parameter = "Fk_business_id,Name,StartRow,EndRow,Status,Pk_id,Types")]
        P_Select_GetMeetingHonouredGuest,

        /// <summary>
        /// 查询会议签到列表
        /// </summary>
        [SqlParameter(Parameter = "Name,StartRow,EndRow,Pk_id,Fk_users_id,Phone")]
        P_Select_GetMeetingSigninList,

        /// <summary>
        /// 查询会议报名列表
        /// </summary>
        [SqlParameter(Parameter = "Name,StartRow,EndRow,Pk_id,Fk_users_id,Phone")]
        P_Select_GetMeetingUsers,

        /// <summary>
        /// 查询供应商信息列表
        /// </summary>
        [SqlParameter(Parameter = "Fk_business_id,Content,StartRow,EndRow")]
        P_Select_GetProductSupplierList,

        /// <summary>
        /// 代理商平台  - 查询下级代理帐号信息
        /// </summary>
        [SqlParameter(Parameter = "Pk_id,StartRow,EndRow,Name")]
        P_Select_GetBusinessAgentList,

        /// <summary>
        /// 查询代理商下面的订单统计
        /// </summary>
        [SqlParameter(Parameter = "Code,Start_date,End_date")]
        P_Select_GetOrderGgentCount,

        /// <summary>
        /// 查询Vip会员的缴费记录
        /// </summary>
        [SqlParameter(Parameter = "Name,Fk_business_id,StartRow,EndRow,Start_date,End_date")]
        P_Select_GetCommonMembershipRecordList,

        /// <summary>
        /// 查询投票活动列表
        /// </summary>
        [SqlParameter(Parameter = "Fk_business_id,Name,Status,StartRow,EndRow")]
        P_Select_GetVoteInfoList,

        /// <summary>
        /// 查询分销佣金关联设置
        /// </summary>
        [SqlParameter(Parameter = "Name,Pk_id,StartRow,EndRow")]
        P_Select_GetUsersGradeRelation,

        /// <summary>
        /// 根据订单号查询产品ID
        /// </summary>
        [SqlParameter(
        CommandType = CommandType.Text,
        CommandText = "SELECT pk_id,fk_stock_id,num,price,(SELECT pay_status FROM b_order where b_order.pk_id=fk_order_id) as 'pay_status',(SELECT name FROM b_order where b_order.pk_id=fk_order_id) as 'name',(SELECT mobile FROM b_order where b_order.pk_id=fk_order_id) as 'mobile',(SELECT address FROM b_order where b_order.pk_id=fk_order_id) as 'address',(SELECT order_no FROM b_order where b_order.pk_id=fk_order_id) as 'order_no',(SELECT num FROM b_product_stock where b_product_stock.pk_id=fk_stock_id) as 'stock_num',isnull((SELECT external_id FROM b_product where b_product.pk_id=fk_pro_id),0) as 'external_id' FROM b_order_product WHERE fk_order_id=@Pk_id",
        Parameter = "Pk_id")]
        P_Select_GetOrderProductByProid,

        /// <summary>
        /// 查询库存信息
        /// </summary>
        [SqlParameter(
        CommandType = CommandType.Text,
        CommandText = "SELECT num,(SELECT external_id FROM b_product WHERE b_product.pk_id=fk_prodtct_id) as'external_id' FROM b_product_stock where pk_id=@Pk_id",
        Parameter = "Pk_id")]
        P_Select_GetProductStockInfo,
 
        /// <summary>
        /// 查询商家数据分析
        /// </summary>
        [SqlParameter(Parameter = "Fk_business_id")]
        P_Select_GetBusinessDataAnalysis,


        /// <summary>
        /// 查询商家人脉数据
        /// </summary>
        [SqlParameter(
        CommandType = CommandType.Text,
        CommandText = "SELECT u_users_webchat.pk_id FROM u_users_webchat LEFT JOIN u_users ON u_users.pk_id= u_users_webchat.fk_users_id WHERE fk_business_id=@Pk_id AND (fk_agent_parent_id!=0 or fk_users_agent_id!=0) AND (isnull(@Start_date,'')='' or (date_creation>=@Start_date)) AND (isnull(@End_date,'')='' or (date_creation<=@End_date))",
        Parameter = "Pk_id,Start_date,End_date")]
        P_Select_GetBusinessContacts,

        /// <summary>
        /// 查询收款二维码地址列表信息
        /// </summary>
        [SqlParameter(Parameter = "Fk_business_id,Types,StartRow,EndRow,Name,Status")]
        P_Select_GetCollectionQrcodeoList,

        /// <summary>
        /// 查询二维码支付订单信息
        /// </summary>
        [SqlParameter(Parameter = "Fk_business_id,Fk_supplier_id,Types,Name,Pay_status,Pay_type,StartRow,EndRow,Start_date,End_date")]
        P_Select_GetCollectionOrderList,

        /// <summary>
        /// 查询供应商下面的门店信息列表
        /// </summary>
        [SqlParameter(Parameter = "Fk_business_id,Fk_supplier_id,Types,Name,Pay_status,Pay_type,StartRow,EndRow,Start_date,End_date")]
        P_Select_GetCollectionStoreList,

        /// <summary>
        /// 查询供应商分红产品订单
        /// </summary>
        [SqlParameter(Parameter = "Fk_business_id,Fk_supplier_id,Name,Pay_status,Pay_type,StartRow,EndRow,Start_date,End_date")]
        P_Select_GetBonusOrderSupplierAllList,


 


        #endregion

        #region 前端-存储过程
        /// <summary>
        /// 查询商家信息
        /// </summary>
        [SqlParameter(Parameter = "Appid")]
        P_Select_Web_GetBusinessInfo,

        /// <summary>
        /// 根据ID查询商家信息
        /// </summary>
        [SqlParameter(Parameter = "Pk_id")]
        P_Select_Web_GetBusinessInfoByID,

        /// <summary>
        /// 查询产品详情
        /// </summary>
        [SqlParameter(Parameter = "Pk_id")]
        P_Select_Web_GetProductDetailed,

        /// <summary>
        /// 查询置换产品详情
        /// </summary>
        [SqlParameter(Parameter = "Pk_id")]
        P_Select_Web_GetSubstitutionProductDetailed,

        /// <summary>
        /// 查询产品套餐详情
        /// </summary>
        [SqlParameter(Parameter = "Pk_id")]
        P_Select_Web_GetProductPackageDetailed,

        /// <summary>
        /// 查询拍卖产品详情
        /// </summary>
        [SqlParameter(Parameter = "Pk_id")]
        P_Select_Web_GetAuctionProductDetailed,

        /// <summary>
        /// 查询积分商城产品详情
        /// </summary>
        [SqlParameter(Parameter = "Pk_id")]
        P_Select_Web_GetMallProductDetailed,

        /// <summary>
        /// 根据OpenID获取用户信息
        /// </summary>
        [SqlParameter(Parameter = "Openid")]
        P_Select_GetUserOpenID,

        /// <summary>
        /// 查询用户返佣信息
        /// </summary>
        [SqlParameter(Parameter = "Pk_id")]
        P_Select_Web_ProductReturnedCommission,

        /// <summary>
        /// 根据设置的分销类型查询用户返佣信息
        /// </summary>
        [SqlParameter(Parameter = "Pk_id,Types")]
        P_Select_Web_ProductReturnedCommissionByGradeType,


        /// <summary>
        /// 查询普通产品是否设置独立分销
        /// </summary>
        [SqlParameter(Parameter = "Pk_id,Level")]
        P_Select_Web_GetProductStockDistribution,

        /// <summary>
        /// 查询订单详情信息
        /// </summary>
        [SqlParameter(Parameter = "Types,Pk_id")]
        P_Select_Web_GetOrderDetailed,

        /// <summary>
        /// 查询门票列表
        /// </summary>
        [SqlParameter(Parameter = "Fk_business_id,Fk_activity_id,Is_red,Mode,One_type,Two_type,Name,StartRow,EndRow")]
        P_Select_Web_GetTicketProList,

        /// <summary>
        /// 查询门票详情
        /// </summary>
        [SqlParameter(Parameter = "Pk_id")]
        P_Select_Web_GetTicketProDetailed,

        /// <summary>
        /// 查询商家餐厅列表信息
        /// </summary>
        [SqlParameter(Parameter = "Pk_id,StartRow,EndRow,Fk_business_id,Name,Status")]
        P_Select_Web_GetMealRestaurant,

        /// <summary>
        /// 查询商家餐厅菜品库存
        /// </summary>
        [SqlParameter(Parameter = "Pk_id,Fk_pro_id,StartRow,EndRow,Name,Status")]
        P_Select_Web_GetMealProStock,

        /// <summary>
        /// 查询商家菜品详情信息
        /// </summary>
        [SqlParameter(
        CommandType = CommandType.Text,
        CommandText = "SELECT b_meal_pro.*,(SELECT SUM(num) FROM b_order_meal WHERE b_order_meal.fk_pro_id=b_meal_pro.pk_id) AS order_count,(SELECT details FROM  m_common_details WHERE type=7 AND m_common_details.fk_pro_id=b_meal_pro.pk_id) AS contents FROM b_meal_pro WHERE b_meal_pro.pk_id=@Pk_id",
        Parameter = "Pk_id")]
        P_Select_Web_GetMealProInfo,

        /// <summary>
        /// 查询当天是否存在签到信息
        /// </summary>
        [SqlParameter(
        CommandType = CommandType.Text,
        CommandText = "select pk_id from u_users_integral where DateDiff(dd, date_creation, getdate())=0  and type = 1 and fk_users_id = @Pk_id",
        Parameter = "Pk_id")]
        P_Select_Web_GetUsersIntegralInfo,
        

        /// <summary>
        /// 微信端查询VIP产品列表
        /// </summary>
        [SqlParameter(Parameter = "Fk_business_id,Types,Pk_id,StartRow,EndRow,Name,Status")]
        P_Select_Web_GetVipGoodsList,

        /// <summary>
        /// 查询视频列表信息
        /// </summary>
        [SqlParameter(Parameter = "Pk_id,StartRow,EndRow,Fk_business_id,Status,Types,Fk_users_id,Name,Level")]
        P_Select_Web_GetVideoList,

        /// <summary>
        /// 查询视频详情列表
        /// </summary>
        [SqlParameter(Parameter = "Name,Pk_id,Types,StartRow,EndRow,Status")]
        P_Select_Web_GetVideoInfoList,

        /// <summary>
        /// 新增团购关联信息
        /// </summary>
        [SqlParameter(Parameter = "Pk_id,Fk_pro_id,Guid,Types")]
        P_Update_Web_AddOrderTeambuyProduct,

        /// <summary>
        /// 查询酒店列表信息
        /// </summary>
        [SqlParameter(Parameter = "Pk_id,Fk_business_id,Types,Mode,Name,StartRow,EndRow,Area,Referenceprice,Theme,Start_date,End_date")]
        P_Select_Web_GetHotelList,

        /// <summary>
        /// 查询酒店详情信息
        /// </summary>
        [SqlParameter(Parameter = "Pk_id,Start_date,End_date")]
        P_Select_Web_GetHotelDetailed,

        /// <summary>
        /// 查询线路产品详情信息
        /// </summary>
        [SqlParameter(Parameter = "Pk_id")]
        P_Select_Web_GetTravelagencyProductDetailed,

        /// <summary>
        /// 查询收藏名片(1=我收藏的名片 2=别人收藏我的名片)
        /// </summary>
        [SqlParameter(Parameter = "Types,Fk_users_id,StartRow,EndRow")]
        P_Select_Web_GetCallingCardCollectionList,

        /// <summary>
        /// 根据openid获取用户信息
        /// </summary>
        [SqlParameter(Parameter = "Openid")]
        P_Select_Web_GetUsersSmallRoutineByOpenID,

        /// <summary>
        /// 根据用户ID查询用户信息
        /// </summary>
        [SqlParameter(Parameter = "Fk_users_id")]
        P_Select_Web_GetUsersInfoByid,

        /// <summary>
        /// 查询优惠劵信息
        /// </summary>
        [SqlParameter(Parameter = "Types,Fk_users_id,Fk_pro_id,Fk_class_id,Is_give,StartRow,EndRow,Fk_business_id,BusinessType")]
        P_Select_Web_GetCouponList,

        /// <summary>
        /// 查询优惠券详细信息
        /// </summary>
        [SqlParameter(Parameter = "Pk_id,Fk_users_id")]
        P_Select_Web_GetCouponInfo,

        /// <summary>
        /// 查询用户排行榜
        /// </summary>
        [SqlParameter(Parameter = "Fk_business_id,StartRow,EndRow")]
        P_Select_Web_GetUsersRankingList,

        /// <summary>
        /// 查询用户排行的订单信息
        /// </summary>
        [SqlParameter(Parameter = "Pk_id")]
        P_Select_Web_GetUsersRankingOrderCount,


        /// <summary>
        /// 查询我的客人数据列表
        /// </summary>
        [SqlParameter(Parameter = "Types,Pk_id,StartRow,EndRow")]
        P_Select_Web_GetMyGuestUsersList,

        /// <summary>
        /// 查询个人统计信息
        /// </summary>
        [SqlParameter(Parameter = "Fk_users_id")]
        P_Select_Web_GetUsersCount,

        /// <summary>
        /// 根据订单类型&订单号查询明细信息
        /// </summary>
        [SqlParameter(Parameter = "Pk_id,Types")]
        P_Select_Web_GetUsersOrderDetailed,

        /// <summary>
        /// 查询商家信息
        /// </summary>
        [SqlParameter(Parameter = "")]
        P_Select_Web_GetBusinessAccount,

        /// <summary>
        /// 查询拼团产品详情
        /// </summary>
        [SqlParameter(Parameter = "Pk_id,Fk_users_id")]
        P_Select_Web_GetTeambuyProductDetailed,

        /// <summary>
        /// 根据拼团关联号查询拼团人数
        /// </summary>
        [SqlParameter(Parameter = "Guid")]
        P_Select_Web_GetTeamBuyUsersByGuid,

        /// <summary>
        /// 新增微信浏览记录
        /// </summary>
        [SqlParameter(Parameter = "DateTime,Fk_business_id,Types,Fk_Product_id,Fk_users_id,Duration")]
        P_Select_Web_AddUsersBrowse,

        /// <summary>
        /// 我的购物车列表
        /// </summary>
        [SqlParameter(Parameter = "Fk_users_id,StartRow,EndRow")]
        P_Select_Web_GetMallShoppingCartList,

        /// <summary>
        /// 删除订单
        /// </summary>
        [SqlParameter(Parameter = "Pk_id")]
        P_Select_Web_DeleteOrderInfo,

        /// <summary>
        /// 查询订单详情信息
        /// </summary>
        [SqlParameter(Parameter = "Pk_id")]
        P_Select_Web_GetOrderDetailedInfo,

        /// <summary>
        /// 重新设置一级分销商（商家不锁粉的时候调用）
        /// </summary>
        [SqlParameter(
        CommandType = CommandType.Text,
        CommandText = "UPDATE u_users_webchat SET fk_users_agent_id = @Fk_users_id,fk_users_webchat_id=@Fk_users_id,fk_agent_parent_id=(select fk_users_agent_id from u_users_webchat where pk_id =@Fk_users_id) WHERE pk_id =@Pk_id",
        Parameter = "Fk_users_id,Pk_id")]
        P_Update_Web_UpdateUsersAgent,

        /// <summary>
        ///  查询VIP会员到期时间
        /// </summary>
        [SqlParameter(
        CommandType = CommandType.Text,
        CommandText = "SELECT top 1 end_date,num FROM m_common_membership_record WHERE fk_users_id=@Fk_users_id and status=1 ORDER BY pk_id DESC",
        Parameter = "Fk_users_id")]
        P_Select_Web_GetMembershipRecord,

        /// <summary>
        /// 更新VIP会员的剩余次数
        /// </summary>
        [SqlParameter(
        CommandType = CommandType.Text,
        CommandText = "UPdate m_common_membership_record set num=num-1 where pk_id=(select top 1 pk_id from m_common_membership_record where fk_users_id=@Fk_users_id order by pk_id desc)",
        Parameter = "Fk_users_id")]
        P_Update_Web_SetMembershipRecord,


        /// <summary>
        /// 查询出行人信息列表
        /// </summary>
        [SqlParameter(
       CommandType = CommandType.Text,
       CommandText = "select name,en_name,mobile,email,certificate_num,sex from u_users_traveler where pk_id in(select content  from FUN_SplitContent(@Name,','))",
       Parameter = "Name")]
        P_Select_Web_GetUsersTravelerInfo,

        /// <summary>
        /// 查询出行人信息集合ID
        /// </summary>
        [SqlParameter(
       CommandType = CommandType.Text,
       CommandText = "SELECT traveler FROM  b_order_travelagency WHERE pk_id =@Pk_id",
       Parameter = "Pk_id")]
        P_Select_Web_GetTraveler,

        /// <summary>
        /// 查询我的小店收藏分类
        /// </summary>
        [SqlParameter(
         CommandType = CommandType.Text,
         CommandText = "SELECT * FROM [u_favourite_class] WHERE fk_users_id = @Pk_id order by sort",
         Parameter = "Pk_id")]
        P_Select_Web_GetFavouriteClass,

        /// <summary>
        /// 查询活动详细信息
        /// </summary>
        [SqlParameter(
         CommandType = CommandType.Text,
         CommandText = "SELECT m_game_info.*,(select COUNT(0) from m_game_record where fk_info_id=@Pk_id and fk_users_id=@Fk_users_id) as record_num,(select COUNT(0) from m_game_order  where m_game_order.fk_info_id=m_game_info.pk_id and fk_users_id=@Fk_users_id) as order_num  FROM m_game_info where pk_id=@Pk_id  and status=1",
         Parameter = "Pk_id,Fk_users_id")]
        P_Select_Web_GetgGameInfo,

        /// <summary>
        /// 查询游戏订单列表
        /// </summary>
        [SqlParameter(Parameter = "Name,Fk_business_id,StartRow,EndRow,Status,Mode,Pk_id")]
        P_Select_Web_GetGameOrderList,

        /// <summary>
        /// 查询会员充值金额设置信息
        /// </summary>
        [SqlParameter(Parameter = "Types,Pk_id,StartRow,EndRow,Name,Status")]
        P_Select_GetRechargeList,

        /// <summary>
        /// 微信端查询链圈列表数据
        /// </summary>
        [SqlParameter(Parameter = "Fk_users_id,StartRow,EndRow")]
        P_Select_Web_GetProductExtensionList,

        /// <summary>
        /// 根据ID查询推广信息详情
        /// </summary>
        [SqlParameter(
        CommandType = CommandType.Text,
        CommandText = "SELECT * FROM [b_chain_extension] WHERE pk_id = @Pk_id",
        Parameter = "Pk_id")]
        P_Select_Web_GetProductExtensionInfo,

        /// <summary>
        /// 查询用户订单列表
        /// </summary>
        [SqlParameter(Parameter = "Fk_users_id,Types,Status,StartRow,EndRow")]
        P_Select_Web_GetUsersOrderList,

        /// <summary>
        /// 查询门票产品的库存
        /// </summary>
        [SqlParameter(Parameter = "Types,Pk_id,Date_travel")]
        P_Select_Web_GetTicketStock,

        /// <summary>
        /// 加入购物车
        /// </summary>
        [SqlParameter(Parameter = "Fk_users_id,Fk_pro_id,Fk_attr_id,Standard,Price,Num")]
        P_Select_Web_AddMallShoppingCart,

        /// <summary>
        /// 查询我的名片
        /// </summary>
        [SqlParameter(Parameter = "Fk_business_id,Fk_users_id,StartRow,EndRow,Pk_id,Fk_relation_users_id")]
        P_Select_Web_GetCallingCardList,

        /// <summary>
        /// 获取海报、分销二维码
        /// </summary>
        [SqlParameter(Parameter = "Types,Fk_Product_id,Appid")]
        P_Select_Web_SmallProgramQRCode,

        /// <summary>
        /// 查询用户收藏产品列表
        /// </summary>
        [SqlParameter(Parameter = "Fk_Product_id,Types")]
        P_Select_Web_GetUsersFavouriteList,

        /// <summary>
        /// 根据收藏类型查询用户是否收藏信息
        /// </summary>
        [SqlParameter(
        CommandType = CommandType.Text,
        CommandText = " SELECT COUNT(0) FROM  u_users_favourite  WHERE type=@Types AND fk_pro_id=@Pk_id AND fk_users_id=@Fk_users_id",
        Parameter = "Fk_users_id,Pk_id,Types")]
        P_Update_Web_GetUserIsFavourite,

        /// <summary>
        /// 查询该用户购买某个产品属性的数量
        /// </summary>
        [SqlParameter(
        CommandType = CommandType.Text,
        CommandText = "SELECT isnull(SUM(num),0) as 'num' FROM  b_order_product left join b_order ON b_order.pk_id=b_order_product.fk_order_id WHERE fk_stock_id=@Pk_id and fk_users_id=@Fk_users_id",
        Parameter = "Fk_users_id,Pk_id")]
        P_Select_Web_GetUsersOrderByNum,
 
        /// <summary>
        /// 保存用户浏览记录
        /// </summary>
        [SqlParameter(
        CommandType = CommandType.Text,
        CommandText = "INSERT INTO [b_chain_extension_view]([fk_users_id], [fk_pro_id]) VALUES (@Fk_users_id,@Pk_id)",
        Parameter = "Fk_users_id,Pk_id")]
        P_Insert_Web_AddChainExtensionView,

        /// <summary>
        /// 查询订单信息
        /// </summary>
        [SqlParameter(Parameter = "Code")]
        P_Select_Web_UpdateOrderStatus,

        /// <summary>
        /// 查询自定义表单
        /// </summary>
        [SqlParameter(
         CommandType = CommandType.Text,
         CommandText = "SELECT pk_id,name,[option],parameter,price FROM m_custom_form WHERE status=1 and pk_id=@Pk_id",
         Parameter = "Pk_id")]
        P_Select_Web_GetCustomFormInfo,

        /// <summary>
        /// 查询2小时内是否有预约数据&当天已取号的数据
        /// </summary>
        [SqlParameter(Parameter = "Fk_users_id,Fk_meal_id")]
        P_Select_AddMealSubscribe,

        /// <summary>
        /// 查询浏览记录-产品
        /// </summary>
        [SqlParameter(Parameter = "Fk_business_id")]
        P_Select_Web_GetUsersBrowseList,

        /// <summary>
        /// 新增订单保险明细
        /// </summary>
        [SqlParameter(Parameter = "Pk_id,Name,Id_card,Remark")]
        P_Update_Web_SetAddOrderInsurance,

        /// <summary>
        /// 更新商品库存&&新增ERP出库记录
        /// </summary>
        [SqlParameter(Parameter = "Pk_id,Types")]
        P_Update_Web_SetProductStock,

        /// <summary>
        /// 根据订单验证商品库存是否充足
        /// </summary>
        [SqlParameter(Parameter = "Order_no")]
        P_Select_Web_IsOrderVerifyInventory,

        /// <summary>
        /// 根据商品验证商品库存是否充足
        /// </summary>
        [SqlParameter(Parameter = "Pk_id,Types")]
        P_Select_Web_IsProductVerifyInventory,

        /// <summary>
        /// 查询餐厅菜品
        /// </summary>
        [SqlParameter(Parameter = "StartRow,EndRow,Fk_business_id,Name,Fk_meal_id,Status,Types")]
        P_Select_Web_GetMealPro,

        /// <summary>
        /// 查询名片预览记录
        /// </summary>
        [SqlParameter(Parameter = "Pk_id,Fk_users_id,Types,StartRow,EndRow")]
        P_Select_Web_BusinessCardBrowse,

        /// <summary>
        /// 单个产品信息
        /// </summary>
        [SqlParameter(
            CommandType = CommandType.Text,
            CommandText = "SELECT TOP 1 fk_business_id,title,logo,img,img_remark FROM b_product INNER JOIN   WHERE pk_id = @Fk_product_id",
            Parameter = "Fk_product_id")]
        P_Select_GetProduct,

        /// <summary>
        /// 单个产品的Sku信息列表
        /// </summary>
        [SqlParameter(
            CommandType = CommandType.Text,
            CommandText = "SELECT pk_id,amount,stock_num,name FROM b_product_stock WHERE fk_prodtct_id = @Fk_product_id",
            Parameter = "Fk_product_id")]
        P_Select_GetProductSku,
        /// <summary>
        /// 查询普通商城产品列表
        /// </summary>
        [SqlParameter(Parameter = "Fk_business_id,Types,Is_red,One_type,Two_type,Fk_activity_id,Fk_supplier_id,Name,Level,StartRow,EndRow")]
        P_Select_Web_GetProductList,

        /// <summary>
        /// 查询产品套餐列表信息
        /// </summary>
        [SqlParameter(Parameter = "Fk_business_id,One_type,Two_type,Fk_supplier_id,Name,StartRow,EndRow")]
        P_Select_Web_GetProductPackageList,

        /// <summary>
        /// 查询优惠券关联使用的产品列表
        /// </summary>
        [SqlParameter(Parameter = "Fk_business_id,Types,Mode")]
        P_Select_Web_GetCouponProductList,

        /// <summary>
        /// 查询拍卖产品列表
        /// </summary>
        [SqlParameter(Parameter = "Fk_business_id,Types,Is_red,One_type,Two_type,Fk_activity_id,Fk_supplier_id,Name,StartRow,EndRow")]
        P_Select_Web_GetAuctionProductList,

        /// <summary>
        /// 查询用户等级及自动更新等级
        /// </summary>
        [SqlParameter(Parameter = "Fk_business_id,Fk_users_id,Price,Types")]
        P_Select_Web_UsersUpgradeLevel,

        /// <summary>
        /// 更新奖金池
        /// </summary>
        [SqlParameter(Parameter = "Types,Pk_id")]
        P_Update_Web_OrderCurrency,

        /// <summary>
        /// 根据订单号查询普通产品可赠送的积分金额
        /// </summary>
        [SqlParameter(
        CommandType = CommandType.Text,
        CommandText = "SELECT b_order_product.price*b_order_product.num FROM b_order_product  LEFT JOIN  b_order ON b_order_product.fk_order_id=b_order.pk_id LEFT JOIN b_product ON b_order_product.fk_pro_id=b_product.pk_id WHERE b_order.type=1 AND integral=1 AND order_no=@Order_no",
        Parameter = "Order_no")]
        P_Select_Web_GetOrderGiveIntegral,

        /// <summary>
        /// 查询分红产品积分数量
        /// </summary>
        [SqlParameter(
        CommandType = CommandType.Text,
        CommandText = "SELECT b_order_bonus.price*b_order_bonus.num FROM b_order_bonus  LEFT JOIN  b_order ON b_order_bonus.fk_order_id=b_order.pk_id LEFT JOIN b_bonus_pro ON b_order_bonus.fk_pro_id=b_bonus_pro.pk_id WHERE b_order.type=12 AND integral=1 AND order_no=@Order_no",
        Parameter = "Order_no")]
        P_Select_Web_GetOrderBonusGiveIntegral,

        /// <summary>
        /// 查询品牌详情
        /// </summary>
        [SqlParameter(Parameter = "Pk_id,StartRow,EndRow")]
        P_Select_Web_GetProductBrandDetailed,

        /// <summary>
        /// 查询商家信息
        /// </summary>
        [SqlParameter(Parameter = "Fk_business_id,Fk_users_id")]
        P_Select_Web_GetUsersBusinessALL,

        /// <summary>
        /// 查询普通商品供应商
        /// </summary>
        [SqlParameter(Parameter = "Detailed_id")]
        P_Select_Web_GetProductSupplier,
 
        /// <summary>
        /// 查询门票订单景区电话
        /// </summary>
        [SqlParameter(Parameter = "Detailed_id")]
        P_Select_Web_GetTicketScenicPhone,
 
        /// <summary>
        /// 充值记录
        /// </summary>
        [SqlParameter(Parameter = "Name,Fk_business_id,StartRow,EndRow,Start_date,End_date,Status")]
        P_Select_GetRechargeRecord,

        /// <summary>
        /// 查询订单明细
        /// </summary>
        [SqlParameter(Parameter = "Pk_id,Types")]
        P_Select_Web_SetTradePlatformPay,

        /// <summary>
        /// 查询分账信息
        /// </summary>
        [SqlParameter(Parameter = "Pk_id")]
        P_Select_Web_SetTradeRoyaltyUnfreeze,

        /// <summary>
        /// 查询自定义表单的签到信息
        /// </summary>
        [SqlParameter(Parameter = "Name,Fk_users_id,Pk_id")]
        P_Select_Web_GetCustomFormValInfo,

        /// <summary>
        /// 查询订单明细物流发货列表
        /// </summary>
        [SqlParameter(Parameter = "Pk_id")]
        P_Select_Web_GetOrderExpressList,

        /// <summary>
        /// 查询物流公司名称
        /// </summary>
        [SqlParameter(
        CommandType = CommandType.Text,
        CommandText = "select name from  m_common_express  where name=@Name or com=@Name",
        Parameter = "Name")]
        P_Select_Web_GetOrderExpressName,

        /// <summary>
        /// 查询线路产品的库存
        /// </summary>
        [SqlParameter(Parameter = "Types,Pk_id,Date_travel")]
        P_Select_Web_GetTravelagencyStock,

        /// <summary>
        /// 查询试卷及题目
        /// </summary>
        [SqlParameter(Parameter = "Pk_id")]
        P_Select_Web_GetGameQuestionPaper,

        /// <summary>
        /// 查询答题内容
        /// </summary>
        [SqlParameter(Parameter = "Pk_id")]
        P_Select_Web_GetGameRecord,

        /// <summary>
        /// 查询活动列表
        /// </summary>
        [SqlParameter(Parameter = "Types,Fk_users_id,Fk_business_id,StartRow,EndRow,Name")]
        P_Select_Web_GetGameInfoList,

        /// <summary>
        /// 查询用户信息
        /// </summary>
        [SqlParameter(
        CommandType = CommandType.Text,
        CommandText = "SELECT * FROM  u_users_webchat LEFT JOIN u_users ON  u_users.pk_id=u_users_webchat.fk_users_id WHERE u_users_webchat.pk_id=@Pk_id",
        Parameter = "Pk_id")]
        P_Select_Web_GetUsersInfo,

        /// <summary>
        /// 保存抽奖记录
        /// </summary>
        [SqlParameter(
        CommandType = CommandType.Text,
        CommandText = "INSERT INTO [m_game_record]([fk_users_id],[fk_info_id])VALUES(@Fk_users_id,@Pk_id)",
        Parameter = "Fk_users_id,Pk_id")]
        P_Insert_Web_AddGameRecord,

        /// <summary>
        /// 新增小游戏订单
        /// </summary>
        [SqlParameter(Parameter = "Fk_business_id,Types,Fk_users_id,Fk_pro_id,Name,Phone,Address,Remark,Pk_id")]
        P_Insert_Web_AddGameOrder,

        /// <summary>
        /// 查询产品库存是否为零
        /// </summary>
        [SqlParameter(
        CommandType = CommandType.Text,
        CommandText = "SELECT num,(SELECT top 1 pk_id FROM m_game_product AS bgp WHERE bgp.fk_business_id=m_game_product.fk_business_id order by num desc ) max_num FROM m_game_product WHERE pk_id=@Pk_id",
        Parameter = "Pk_id")]
        P_Select_Web_GetGameProductNum,

        /// <summary>
        /// 更新游戏订单收货信息
        /// </summary>
        [SqlParameter(
        CommandType = CommandType.Text,
        CommandText = "UPDATE m_game_order SET name=@Name,phone=@Phone,address=@Address where pk_id=@Pk_id",
        Parameter = "Name,Phone,Address,Pk_id")]
        P_Update_Web_UpdateGameOrderInfo,

        /// <summary>
        /// 查询用户参与活动及对应证书
        /// </summary>
        [SqlParameter(Parameter = "Fk_users_id,StartRow,EndRow")]
        P_Select_Web_GetGameOrderCertificateList,

        /// <summary>
        /// 查询供应商详细信息，类型 1 查询详情，其他查询列表信息
        /// </summary>
        [SqlParameter(Parameter = "Types,StartRow,EndRow,Name,Fk_business_id")]
        P_Select_Web_GetProductSupplierList,

        /// <summary>
        /// 查询最新报名的500人信息列表
        /// </summary>
        [SqlParameter(
         CommandType = CommandType.Text,
         CommandText = "SELECT top 500 fk_users_id,date_creation,uname,phone FROM  m_custom_form_val  WHERE fk_custom_form_id=@Pk_id ORDER BY pk_id DESC",
         Parameter = "Pk_id")]
        P_Select_Web_GetCustomFormValList,

        /// <summary>
        /// 根据条码查询防伪信息
        /// </summary>
        [SqlParameter(
         CommandType = CommandType.Text,
         CommandText = "SELECT *,'' as web_url  FROM b_product_bar_code left join b_product_bar_security on b_product_bar_security.pk_id=b_product_bar_code.fk_security_id  where code=@Pk_id  Update b_product_bar_code  set status=1 where code=@Pk_id",
         Parameter = "Pk_id")]
        P_Select_Web_GetSecurityByCodeInfo,

        /// <summary>
        /// 查询拍卖场次数据
        /// </summary>
        [SqlParameter(Parameter = "Pk_id,StartRow,EndRow,Start_date")]
        P_Select_Web_GetProductAuctionNum,

        /// <summary>
        /// 根据会员ID查询押金缴费信息，以及会员的到期时间
        /// </summary>
        [SqlParameter(Parameter = "Fk_users_id,StartRow,EndRow")]
        P_Select_Web_GetUsersDepositInfo,

        /// <summary>
        /// 通过拍卖产品ID查询库存信息
        /// </summary>
        [SqlParameter(
         CommandType = CommandType.Text,
         CommandText = "select * from b_product_auction_stock where DateDiff(dd, b_product_auction_stock.end_date, getdate())=0 and fk_prodtct_id = @Pk_id",
         Parameter = "Pk_id")]
        P_Select_Web_GetProductAuctionStock,

        /// <summary>
        /// 查询会员的购买VIP的最新记录
        /// </summary>
        [SqlParameter(
         CommandType = CommandType.Text,
         CommandText = "SELECT top 1 end_date,pk_id,num,status FROM  m_common_membership_record  WHERE fk_users_id=@Fk_users_id and status=1  order by pk_id desc",
         Parameter = "Fk_users_id")]
        P_Select_Web_GetMembershipRecordInfo,

        /// <summary>
        /// 查询用户押金状态
        /// </summary>
        [SqlParameter(
         CommandType = CommandType.Text,
         CommandText = "SELECT top 1 pk_id FROM  b_product_auction_deposit  where fk_users_id = @Fk_users_id and pay_status = 1",
         Parameter = "Fk_users_id")]
        P_Select_Web_GetAuctionDeposit,

        /// <summary>
        /// 根据订单号查押金信息
        /// </summary>
        [SqlParameter(Parameter = "Order_no")]
        P_Select_Web_GetAuctionDepositByNo,

        /// <summary>
        /// 查询拍卖库存信息
        /// </summary>
        [SqlParameter(
        CommandType = CommandType.Text,
        CommandText = "SELECT amount,procurement_price,platfor_price FROM  b_product_auction_stock where pk_id=@Pk_id",
        Parameter = "Pk_id")]
        P_Select_Web_GetProductAuctionStockInfo,

        /// <summary>
        /// 前端页面根据类型查询评论列表
        /// </summary>
        [SqlParameter(Parameter = "Fk_Product_id,Pk_id,Fk_users_id,StartRow,EndRow,Types")]
        P_Select_Web_GetCommonCommentList,

        /// <summary>
        /// 红包使用记录详情
        /// </summary>
        [SqlParameter(Parameter = "Pk_id")]
        P_Select_Web_GetRedEnvelopesRecordItem,

        /// <summary>
        /// 红包使用记录
        /// </summary>
        [SqlParameter(Parameter = "Fk_users_id,StartRow,EndRow")]
        P_Select_Web_GetRedEnvelopesRecordList,

        /// <summary>
        /// 红包领取记录列表
        /// </summary>
        [SqlParameter(Parameter = "Fk_users_id,StartRow,EndRow")]
        P_Select_Web_GetRedEnvelopesReceiveList,

        /// <summary>
        /// 查红包领取记录信息
        /// </summary>
        [SqlParameter(
        CommandType = CommandType.Text,
        CommandText = "SELECT b_red_envelopes_receive.*, b_red_envelopes.name, b_red_envelopes.logo FROM  b_red_envelopes_receive  LEFT JOIN  b_red_envelopes ON b_red_envelopes.pk_id = b_red_envelopes_receive.fk_envelopes_id WHERE fk_record_id = @Pk_id ORDER BY b_red_envelopes_receive.pk_id DESC",
        Parameter = "Pk_id")]
        P_Select_Web_GetEnvelopesReceiveList,

        /// <summary>
        /// 根据帐号密码查询用户
        /// </summary>
        [SqlParameter(
        CommandType = CommandType.Text,
        CommandText = "SELECT (SELECT top 1 pk_id FROM u_users_webchat WHERE fk_users_id=u_users.pk_id) AS 'users_id' FROM  u_users where mobile=@Phone and password=@PassWord",
        Parameter = "Phone,PassWord")]
        P_Select_Web_GetUsersLogin,

        /// <summary>
        /// 删除原来订单明细信息
        /// </summary>
        [SqlParameter(
        CommandType = CommandType.Text,
        CommandText = "delete b_order_meal where fk_order_id=@Pk_id",
        Parameter = "Pk_id")]
        P_Delete_Web_DelOrderMeal,

        /// <summary>
        /// 查询拼团信息
        /// </summary>
        [SqlParameter(
        CommandType = CommandType.Text,
        CommandText = "SELECT p_teambuy_users.status,p_teambuy_pro.rebate,p_teambuy_pro.free_order,number,(SELECT TOP 1 fk_users_id FROM p_teambuy_users AS ptu LEFT JOIN b_order on b_order.pk_id=ptu.fk_order_id WHERE ptu.guid=p_teambuy_users.guid ORDER BY ptu.pk_id ) as fk_users_id,(SELECT TOP 1 total_amount FROM p_teambuy_users AS ptu LEFT JOIN b_order on b_order.pk_id=ptu.fk_order_id WHERE ptu.guid=p_teambuy_users.guid ORDER BY ptu.pk_id ) as total_amount,(SELECT COUNT(0) FROM p_teambuy_users AS ptu WHERE ptu.guid=p_teambuy_users.guid) as order_count FROM  p_teambuy_users  LEFT JOIN p_teambuy_pro ON p_teambuy_pro.pk_id=fk_teambuy_id WHERE fk_order_id=@Pk_id",
        Parameter = "Pk_id")]
        P_Select_Web_GetTeambuyUsersInfo,

        /// <summary>
        /// 律动仪设备列表
        /// </summary>
        [SqlParameter(Parameter = "Fk_business_id,Fk_attr_id,Fk_pro_id,Name,Status,StartRow,EndRow")]
        P_Select_GetRhythmDeviceList,

        /// <summary>
        /// 律动订单列表
        /// </summary>
        [SqlParameter(Parameter = "Fk_business_id,Fk_attr_id,Status,Name,StartRow,EndRow")]
        P_Select_GetRhythmOrderList,

        /// <summary>
        /// 查询会议活动报名信息
        /// </summary>
        [SqlParameter(Parameter = "Pk_id,Fk_users_id,Name,Phone")]
        P_Select_Web_GetMeetingUsersInfo,

        /// <summary>
        /// 通过手机号码查询用户信息
        /// </summary>
        [SqlParameter(
        CommandType = CommandType.Text,
        CommandText = "SELECT * FROM  u_users_webchat LEFT JOIN  u_users ON  u_users.pk_id= u_users_webchat.fk_users_id WHERE mobile=@Phone AND fk_business_id=@Pk_id",
        Parameter = "Phone,Pk_id")]
        P_Select_Web_GetUsersInfoByPhone,

        /// <summary>
        /// 查询6分钟之内的验证码是否存在
        /// </summary>
        [SqlParameter(
       CommandType = CommandType.Text,
       CommandText = "SELECT top 1 code FROM  m_sms_code where date_creation >DATEADD(MINUTE,-6,GETDATE()) and mobile=@Phone order by pk_id desc",
       Parameter = "Phone")]
        P_Select_Web_GetSmsCodeInfo,

        /// <summary>
        /// 通过手机号码查询用户是否已经注册
        /// </summary>
        [SqlParameter(
        CommandType = CommandType.Text,
        CommandText = "SELECT u_users_webchat.pk_id FROM  u_users_webchat left join u_users on u_users.pk_id=fk_users_id WHERE mobile=@Phone and fk_business_id=@Fk_business_id and status=1",
        Parameter = "Phone,Fk_business_id")]
        P_Select_Web_GetUsersWebchatByPhone,

        /// <summary>
        /// 查询电子条码信息
        /// </summary>
        [SqlParameter(
        CommandType = CommandType.Text,
        CommandText = "SELECT users_agent_id,guid,ISNULL((SELECT rebate FROM b_electron_info WHERE pk_id=fk_info_id),0) AS 'rebate' FROM  b_electron_code WHERE code=@Code",
        Parameter = "Code")]
        P_Select_Web_GetElectronCodeInfo,

        /// <summary>
        /// 微信端查询电子卡的使用记录
        /// </summary>
        [SqlParameter(Parameter = "Fk_users_id,Name,Start_date,End_date,StartRow,EndRow")]
        P_Select_GetElectronCodeUsageRecord,

        /// <summary>
        /// 查询用户的分红佣金和等级
        /// </summary>
        [SqlParameter(Parameter = "Fk_users_id")]
        P_Select_Web_GetUsersCommissionAndLevel,

        /// <summary>
        /// 查询用户类型的购买的分红产品总金额
        /// </summary>
        [SqlParameter(
        CommandType = CommandType.Text,
        CommandText = "SELECT(SELECT ISNULL(SUM(total_amount),0) from b_order where fk_users_id=@Fk_users_id and pay_status not in(0,3) and type=12) as 'count'",
        Parameter = "Fk_users_id")]
        P_Select_Web_GetUsersOrderCount,

        /// <summary>
        /// 查询上级和等级名称
        /// </summary>
        [SqlParameter(
        CommandType = CommandType.Text,
        CommandText = "SELECT fk_users_agent_id,(select name from b_users_grade where pk_id=(SELECT level FROM u_users_webchat AS uuw WHERE uuw.pk_id=u_users_webchat.fk_users_agent_id)) as grade_name FROM  u_users_webchat where pk_id=@Fk_users_id",
        Parameter = "Fk_users_id")]
        P_Select_Web_GetUsersAgentIdAndGradeName,

        /// <summary>
        /// 查询投票活动详情
        /// </summary>
        [SqlParameter(Parameter = "Pk_id,Fk_users_id")]
        P_Select_Web_GetVoteInfoDetails,

        /// <summary>
        /// 查询订单用户ID
        /// </summary>
        [SqlParameter(
        CommandType = CommandType.Text,
        CommandText = "SELECT fk_users_id FROM  b_order_coupon LEFT JOIN b_order ON b_order_coupon.fk_order_id=b_order.pk_id  WHERE fk_package_id=@Pk_id",
        Parameter = "Pk_id")]
        P_Select_Web_GetOrderCouponToUsersID,


        /// <summary>
        /// 查询报名活动列表信息
        /// </summary>
        [SqlParameter(Parameter = "Fk_business_id,StartRow,EndRow,Status,Types,Name")]
        P_Select_Web_GetEnrollInfoList,

        /// <summary>
        /// 查询报名信息列表
        /// </summary>
        [SqlParameter(Parameter = "Fk_info_id,Fk_users_id,Start_date,End_date,StartRow,EndRow")]
        P_Select_Web_GetEnrollUsersList,

        /// <summary>
        /// 查询报名活动评分信息列表
        /// </summary>
        [SqlParameter(Parameter = "Pk_id,Fk_info_id,Start_date,End_date,StartRow,EndRow")]
        P_Select_Web_GetEnrollGradeList,

        /// <summary>
        /// 查询分红统计,商家数据库查询奖金池统计
        /// </summary>
        [SqlParameter(Parameter = "Fk_business_id")]
        P_Select_Web_GetDividendStatistics,

        /// <summary>
        /// 查询资源对接列表信息
        /// </summary>
        [SqlParameter(Parameter = "Fk_business_id,Name,Area,Types,Price,StartRow,EndRow")]
        P_Select_Web_GetResourcesInfoList,

        #endregion
    }

    /// <summary>
    /// 参数类
    /// </summary>
    public class SqlParameterModel
    {
        #region 分页属性，序列传进不传出

        /// <summary>
        /// 初始起始行
        /// </summary>
        [ScriptIgnore]
        [IgnoreDataMember]
        public int StartRow { get { return (CurrentPage - 1) * PageSize + (CurrentPage == 1 ? 0 : 1); } }

        /// <summary>
        /// 初始结束行
        /// </summary>
        [ScriptIgnore]
        [IgnoreDataMember]
        public int EndRow { get { return StartRow + PageSize - (CurrentPage == 1 ? 0 : 1); } }

        private int currentPage = 1;
        public int CurrentPage
        {
            get { return currentPage; }
            set { currentPage = value > 0 ? value : currentPage; }
        }

        private int pageSize = 10;
        [IgnoreDataMember]
        public int PageSize
        {
            get { return pageSize; }
            set { pageSize = value; }
        }

        [ScriptIgnore]
        [IgnoreDataMember]
        public int PageCount { get { return (RecordCount + PageSize - 1) / PageSize; } }

        [ScriptIgnore]
        [IgnoreDataMember]
        public object StoredProcedure { get; set; }

        #endregion

        #region 自定义参数
        public int Agent_id { get; set; }
        public DateTime Express_date { get; set; }
        public string Descript { get; set; }
        public int Fk_coupon_id { get; set; }
        public int Is_cash { get; set; }
        public int Common_Type { get; set; }
        public int ReturnValue { get; set; }
        public int RecordCount { get; set; }
        public int Referenceprice { get; set; }
        public int Detailed_id { get; set; }
        public int Fk_attr_id { get; set; }
        public string Code { get; set; }
        public string Theme { get; set; }
        public int Start_money { get; set; }
        public int End_money { get; set; }
        public int Fk_relation_users_id { get; set; }
        public int Num { get; set; }
        public string Standard { get; set; }
        public decimal Price { get; set; }
        public int Sort { get; set; }
        public string Pk_id { get; set; }
        public string Name { get; set; }
        public string Types { get; set; }
        public string BusinessType { get; set; }
        public int Status { get; set; }
        public int Mode { get; set; }
        public string Relation_business { get; set; }
        public string Sex { get; set; }
        public string Start_date { get; set; }
        public string End_date { get; set; }
        public string Level { get; set; }
        public int Fk_business_id { get; set; }
        public int Fk_activity_id { get; set; }
        public int Fk_supplier_id { get; set; }
        public string Content { get; set; }
        public int Is_online { get; set; }
        public string Area { get; set; }
        public string Order_no { get; set; }
        public string Express { get; set; }
        public string Express_no { get; set; }
        public int Is_red { get; set; }
        public int One_type { get; set; }
        public int Two_type { get; set; }
        public string Openid { get; set; }
        public int Fk_meal_id { get; set; }
        public string Fk_pro_id { get; set; }
        public string Fk_class_id { get; set; }
        public string Fk_users_id { get; set; }
        public string Guid { get; set; }
        public int Is_give { get; set; }
        public int Fk_users_webchat_id { get; set; }
        public string Real_name { get; set; }
        public string Mobile { get; set; }
        public string Weixin { get; set; }
        public string QQ { get; set; }
        public string Account { get; set; }
        public string Appid { get; set; }
        public int One_level { get; set; }
        public int Two_level { get; set; }
        public int Pay_type { get; set; }
        public int Fk_Product_id { get; set; }
        public int Duration { get; set; }
        public DateTime DateTime { get; set; }
        public string Date_travel { get; set; }
        public string Remark { get; set; }
        public string Id_card { get; set; }
        public string Insurance { get; set; }
        public string Parents { get; set; }
        public int Pay_status { get; set; }
        public int Fk_scenic_id { get; set; }
        public string Val { get; set; }
        public string Phone { get; set; }
        public string Address { get; set; }
        public int Auction { get; set; }
        public string PassWord { get; set; }
        public int Fk_stock_id { get; set; }
        public decimal Amount { get; set; }
        public string Users_tag { get; set; }
        public int Fk_demand_id { get; set; }
        public int Share_status { get; set; }
        public int Fk_info_id { get; set; }
        


        #endregion
    }
}
